url = '/:slug|[a-z\-\_]+-[0-9\-\_]+-\d+.html$'
title = '分类筛选页模板'
layout = 'default'
==
use Jason\Ccshop\Controllers\Filters;
function onStart() {
  $slugArr = explode('-', str_replace('.html', '', $this->param('slug')));
  $id = array_pop($slugArr);
  $this['paramKey'] = array_shift($slugArr);
  $this['paramValue'] = $slugArr;
  $this['strParamValue'] = join('-', $slugArr);
  $condition = ['id' => $id];
  $category = App::make('Jason\Ccshop\Controllers\Categories')->category($condition);
  if ($category) {
    $this['category'] = $category;
  } else {
    return redirect('/404');
  }

}
==
{% set filterData = catalog.getFilterProducts(category, paramKey, paramValue) %}
{% set products = filterData.products %}

{% set per = get('per', 20) %}
{% set currentPage = get('page', 1) %}
{% put page_title %}{% for feature in filterData.displayNames %}{{ feature.name.name }}: {{ feature.value.name }}. {% endfor %} {{ category.page_title }} - {% default %}{% endput %}
{% put pageurl %}{{ catalog.canonicalValue('catalog/filter-feature'|page, 'category')|raw }}{% endput %}
{% put nextprePageUrl %}
{% if filterData.products.nextPageUrl %}
<link rel="next" href="{{ filterData.products.nextPageUrl }}">
{% endif %}
{% endput %}
{% put meta_description %}{% for feature in filterData.displayNames %}{{ feature.name.name }}: {{ feature.value.name }}. {% endfor %} {{ category.meta_description }}{% endput %}

<div class="category_content">
    <!-- breadcrumbs -->
    {% partial 'common/breadCrumb' category=category%}
    <!-- breadcrumbs end -->
    <div class="categoryCont">
      <div class="container">
        {% partial 'catalog/category-sidebar' %}
        <div class="fr rightBox">
          <div class="catg_rightBoxTop boxSizing">
            <div class="fl">
              <button class="fiveShow" dataClass="fiveShow"><i class="fa fa-th"></i></button>
              <button class="threeShow active" dataClass="threeShow"><i class="fa fa-th-large"></i></button>
            </div>
            {% partial 'catalog/category-paging' %}
            
          </div>
          {% partial 'catalog/list-toobar' %}
          <div class="catg_productBox">
            {% partial 'catalog/list-product' %}
          </div>

          <div class="catg_rightBoxTop boxSizing">
            <{% partial 'catalog/category-paging' %}
          </div>
        </div>
      </div>
    </div>
  </div>